<template>
  <el-breadcrumb separator-class="el-icon-arrow-right">
    <el-breadcrumb-item v-for="(list, index) in breadLists" :key="list.path">
      <router-link v-if="index === 0" to="/welcome">
        {{ list.meta.title }}
      </router-link>
      <template v-else>
        {{ list.meta.title }}
      </template>
    </el-breadcrumb-item>
  </el-breadcrumb>
</template>

<script>
export default {
  name: 'BreadCrumb',
  computed: {
    breadLists() {
      return this.$route.matched
    }
  },
  mounted() {
    console.log(this.$route)
  }
}
</script>

<style lang="scss" scoped></style>
